package com.design.prototype;

/**
 * 电脑
 *
 * @author <a href="jiangfeng.yan@ikang.com">jiangfeng</a>
 * @version 2021年06月17日 上午 10:57
 */
public class Computer implements Cloneable {
    //品牌与颜色
    private String color;
    private String brand;
    public String getColor() {
        return color;
    }
    public void setColor(String color) {
        this.color = color;
    }
    public String getBrand() {
        return brand;
    }
    public void setBrand(String brand) {
        this.brand = brand;
    }

    public Computer() {
    }

    public Computer(String color, String brand) {
        this.color = color;
        this.brand = brand;
    }

    @Override
    public String toString() {
        return "Computer{" +
                "color='" + color + '\'' +
                ", brand='" + brand + '\'' +
                '}';
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        Computer computer = null;
        try {
            computer = (Computer) super.clone();
        }catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return computer;
    }


}
